package com.example.medical_delivery_system.dao;

import com.example.medical_delivery_system.entity.Cart;
import org.apache.ibatis.annotations.Param;
import java.util.List;

public interface CartMapper {
    int deleteByPrimaryKey(Long cartItemId);

    int insert(Cart record);

    int insertSelective(Cart record);

    Cart selectByPrimaryKey(Long cartItemId);

    Cart selectByUserIdAndGoodsId(@Param("userId") Long userId, @Param("goodsId") Long goodsId);

    List<Cart> selectByUserId(@Param("userId") Long userId, @Param("number") int number);

    int updateByPrimaryKeySelective(Cart record);

    int deleteBatch(List<Long> ids);
    List<Cart> selectByUserIdAndCartItemIds(@Param("userId") Long userId, @Param("cartItemIds") List<Long> cartItemIds);


}